package com.yootk.main;

import com.yootk.bean.vo.Message;
import com.yootk.bean.vo.bean.YootkProfile;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.core.env.PropertyResolver;
import org.springframework.core.env.StandardEnvironment;

public class SpringAnnotationProfile {
    private static final Logger LOGGER = LoggerFactory.getLogger(SpringAnnotationProfile.class);
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext() ;
        context.getEnvironment().setActiveProfiles("product");
        context.register(YootkProfile.class);
        context.refresh();
        Message message = context.getBean(Message.class) ;
        LOGGER.info("【获Message.path属性】path = {}", message.getPath());
    }
}